<?php
namespace app\admin\controller;


class Index extends Base
{



    public function index()
    {
        //总计会员
         $userTotalCount = model('user')->count();
        //本周新增会员
        $monday = strtotime('this week Monday',time());
        $userWeekCount = model('user')->where('createTime','>=',$monday)->count();

        $grade['V1Count'] = model('user')->where('grade',1)->count();
        $grade['V2Count'] = model('user')->where('grade',2)->count();
        $grade['V3Count'] = model('user')->where('grade',3)->count();
        $grade['V4Count'] = model('user')->where('grade',4)->count();
        $grade['V5Count'] = model('user')->where('grade',5)->count();
        $grade['V6Count'] = model('user')->where('grade',6)->count();
        $grade['V7Count'] = model('user')->where('grade',7)->count();
        $grade['V8Count'] = model('user')->where('grade',8)->count();
        $grade['V9Count'] = model('user')->where('grade',9)->count();
        $this->assign('userTotalCount',$userTotalCount);
        $this->assign('userWeekCount',$userWeekCount);
        $this->assign('grade',$grade);

        return view('index');

    }


































}
